//
//  TMFootprintCell.m
//  国学商家管理
//
//  Created by Tao Li on 2018/7/2.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMFootprintCell.h"
#import "TMCollectionModel.h"
@implementation TMFootprintCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.courseImage.contentMode = UIViewContentModeScaleAspectFill;
    self.courseImage.clipsToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setCourseModel:(TMCollectionModel *)courseModel{
    _courseModel = courseModel;
    if (courseModel.pic.count) {
        [self.courseImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:courseModel.pic[0]]] placeholderImage:kPlaceholder];
    }
    self.courseName.text = courseModel.name;
    self.teacherName.text = [NSString stringWithFormat:@"任课老师:%@", courseModel.tea_name];
    self.priceLabel.text = [NSString stringWithFormat:@"%.02f元",courseModel.price];
}
@end
